package com.cloudbroker.bcs.platform.dav.middle.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cloudbroker.bcs.platform.dav.middle.dao.PlugsTypeDAO;
import com.cloudbroker.bcs.platform.dav.middle.entity.PlugsType;
import com.cloudbroker.bcs.platform.dav.middle.service.PlugsTypeService;
import com.cloudbroker.bcs.platform.dav.middle.service.base.TenantServiceImplBase;

@Service
public class PlugsTypeServiceImpl extends TenantServiceImplBase<PlugsType, String> implements PlugsTypeService{

	@Resource
	private PlugsTypeDAO plugTypeDAO;
	
	@Override
	protected PlugsTypeDAO getDAO(){
		return plugTypeDAO;
	}

	@Override
	public Long getMaxSort(PlugsType form) {
		Long maxNum = plugTypeDAO.getMaxSort(form);
		return maxNum == null ? 0 : maxNum+1L;
	}

    @Override
    public void deleteAll() {
        plugTypeDAO.deleteAll();
    }
}
